import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Hua YY
 * Date: 2024-10-02
 * Time: 12:18
 */
public class IOStream8 {
    public static void main(String[] args) throws IOException {
        try(InputStream inputStream = new FileInputStream("./test.txt")){
            //读取操作,读到-1的时候就会停止
            while(true){
                int a = inputStream.read();
                if (a == -1){
                    break;
                }
                System.out.print(a + " ");//读取的abcdef是ascii码值
            }
        }
    }
}

